package com.lwx.jdbc;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;

public class JdbcMain {
    public static void main(String[] args) throws Exception {
        Class.forName("com.mysql.jdbc.Driver");
        Connection conn = DriverManager.getConnection("jdbc:mysql://192.168.1.121:3306/test", "root", "88101053");
        Statement st = conn.createStatement();
        
        for(int i = 0; i < 20; i++){
            if(i % 2 == 0){
                st.execute("insert into test1(c1, c2, c3) values(1, 'aa', 'aa')");
            }else{
                st.execute("insert into test1(c1, c2, c3) values(1, 'bb', 'bb')");
            }
        }
    }

}
